import request from '@/utils/request'

// 创建领料申请单
export function createReceiveApply(data) {
  return request({
    url: '/wms/receive-apply/create',
    method: 'post',
    data: data
  })
}

// 更新领料申请单
export function updateReceiveApply(data) {
  return request({
    url: '/wms/receive-apply/update',
    method: 'put',
    data: data
  })
}

// 删除领料申请单
export function deleteReceiveApply(id) {
  return request({
    url: '/wms/receive-apply/delete?id=' + id,
    method: 'delete'
  })
}

// 获得领料申请单
export function getReceiveApply(id) {
  return request({
    url: '/wms/receive-apply/get?id=' + id,
    method: 'get'
  })
}

// 获得领料申请单分页
export function getReceiveApplyPage(query) {
  return request({
    url: '/wms/receive-apply/page',
    method: 'get',
    params: query
  })
}

// 导出领料申请单 Excel
export function exportReceiveApplyExcel(query) {
  return request({
    url: '/wms/receive-apply/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
